package example

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type VideoUserRouter struct {}

// InitVideoUserRouter 初始化 videoUser表 路由信息
func (s *VideoUserRouter) InitVideoUserRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	videoUserRouter := Router.Group("videoUser").Use(middleware.OperationRecord())
	videoUserRouterWithoutRecord := Router.Group("videoUser")
	videoUserRouterWithoutAuth := PublicRouter.Group("videoUser")
	{
		videoUserRouter.POST("createVideoUser", videoUserApi.CreateVideoUser)   // 新建videoUser表
		videoUserRouter.DELETE("deleteVideoUser", videoUserApi.DeleteVideoUser) // 删除videoUser表
		videoUserRouter.DELETE("deleteVideoUserByIds", videoUserApi.DeleteVideoUserByIds) // 批量删除videoUser表
		videoUserRouter.PUT("updateVideoUser", videoUserApi.UpdateVideoUser)    // 更新videoUser表
	}
	{
		videoUserRouterWithoutRecord.GET("findVideoUser", videoUserApi.FindVideoUser)        // 根据ID获取videoUser表
		videoUserRouterWithoutRecord.GET("getVideoUserList", videoUserApi.GetVideoUserList)  // 获取videoUser表列表
	}
	{
	    videoUserRouterWithoutAuth.GET("getVideoUserPublic", videoUserApi.GetVideoUserPublic)  // videoUser表开放接口
	}
}
